/**
 * @file SWOSolver.h
 * @author shikang999@126.com
 * @brief 此算法参考:Abdel-Basset M, Mohamed R, Jameel M, et al. Spider wasp optimizer: A novel meta-heuristic optimization algorithm[J]. Artificial Intelligence Review, 2023: 1-64
 * @version 0.1
 * @date 2025-06-23
 * 
 * @copyright Copyright (c) 2025
 * 
 */
#pragma once
#include "BaseSolver.h"

namespace Solver
{

class SWOSolver: public BaseSolver
{
public:
    SWOSolver(bool forceUpdate = false);
    ~SWOSolver();

private:
    void solveByIter() final;//重载这个函数实现迭代

    //预处理参数
    void preParams();

    void searchAgents();

    void searchAgents2();

private:
    bool forceUpdate_;
    value_t vTR_; 
    value_t vA_;
    value_t vC_;
    value_t vW_;
    std::normal_distribution<value_t> vSWONorm01_;
    VectorXd_t v1_, v2_;
};

}